#include <stdio.h>

#include <OpenGL/gl.h>
#include <GLUT/glut.h>

//--------
// const values
//--------
static const int WINDOW_WIDTH = 640;
static const int WINDOW_HEIGHT = 480;
static const char* WINDOW_TITLE = "wash your monkey";

//--------
// display
//--------
void display()
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    glutSwapBuffers();
}

//--------
// main
//--------
int main(int argc, char** argv)
{
    
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
    glutInitWindowSize(WINDOW_WIDTH, WINDOW_HEIGHT);
    glutCreateWindow(WINDOW_TITLE);

    printf("\n==[OpenGL Info]==\n");
    printf("vendor: %s\n", glGetString(GL_VENDOR));
    printf("version: %s\n", glGetString(GL_VERSION));
    printf("renderer: %s\n", glGetString(GL_RENDERER));
    printf("GLSL Version: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
    printf("\n");
    
    glutDisplayFunc(display);

    glEnable(GL_DEPTH_TEST);
    glClearColor(1,1,1,1);

    glutMainLoop();

    return 0;
}
